<template>
  <div>
    <el-form-item label="头像" prop="avatar">
      <el-upload class="avatar-uploader" action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
        :show-file-list="false" :auto-upload="false" :on-change="handleChange">
        <img v-if="userForm.avatar" :src="userForm.avatar" class="avatar" />
        <el-icon v-else class="avatar-uploader-icon">
          <Plus />
        </el-icon>
      </el-upload>
    </el-form-item>
  </div>
</template>

<script setup>
// 图像地址显示
const avatarUrl = computed(() => {
  // 这个位置暂时拿不到数据，数据还没存储的vuex中 
  // store.state.userIfo.avatar ? store.state.userIfo.avatar : `https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png`
}) 
</script>

<style></style>